<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>"/>
<link rel="shortcut icon" href="images/store.png" /><!--图片log  -->
<title>购物车</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<link href="css/base.css" rel="stylesheet">
<link href="css/shopcar.css?v=0704" rel="stylesheet">
<link href="css/toTop.css?v=0715" rel="stylesheet">
</head>
<body style="padding: 0px 0px 55px;">
    <div class="by_w" id="by_w">
        <div class="m_pagetop" align="center">
            <span class="m_goback" onclick="document.location.href = 'javascript:history.go(-1)';"></span>
            <span class="m_title">购物车</span>
        </div>
        <div style="min-height: 475px;" class="m_wap" id="min_hdiv" align="center">
            <div id="shopcar" class="shopcar">
                <div class="m_carsj">
                    <div class="m_prd_d">
                      <c:forEach items="${cartList}" var="cart">
                        <table class="m_c_tab">
                            <tbody>
                                <tr>
                                    <td rowspan="2" align="left" valign="top" width="10%">
                                        <span class="m_qx p_ck_one c_checked p_ck_one130083" tid="${cart.cid}">
                                        </span>
                                        <input id="minnum" value="${cart.zhongbz}" hidden />
                                        <input id="priceZhj" value="${cart.priceZhj}" hidden />
                                        <input id="priceChl" value="${cart.priceChl}" hidden />
                                        <input id="jlgg" value="${cart.jlgg}" hidden />
                                    </td>
                                    <td rowspan="2" class="pic">
                                        <a class="m_p_plink touri" href="javascript:;">
                                            <%-- <img src="images/product/${cart.spid}/0.jpg" height="88px" width="90px" /> --%>
                                            <img  src="http://www.hnhcyy.com/resource/img/${cart.spid}/10.jpg" height="88px" width="90px" />
                                        </a>
                                    </td>
                                    <td class="relative">
                                    	<!--根据商品id，改变商品详情的url  -->
										<c:set value="Shop/Detail" var="detail"></c:set>
										<c:set value="${fn:substring(cart.spid,3,4)}" var="idn"></c:set>
										<c:if test="${idn=='Z'}">
											<c:set value="NonDrug/Detail" var="detail"></c:set>
										</c:if>
                                        <a href="${detail}?productid=${cart.spid}&sjid=${sjid}" class="m_p_name escp">${cart.spmch}</a>
                                        <span id="zjg" class="f60 p_dg_jg">￥<span class="price">${cart.FPrice}</span></span>
                                        <span class="m_p_cmbz">
                                            <span class="m_p_cm2">批号：<em style="font-style:initial;">≥${cart.pihao}</em></span>
                                            <span class="lingshoujia">￥${cart.lingshoujia}</span>
                                        </span>
                                        <span class="guige">规格：${cart.shpgg}</span>
                                    </td>
                                </tr>
                                <!--实现加减-->
                                <tr>
                                    <td align="left" valign="middle">
                                        <span class="m_p_pts">
                                            <div style="color:#999999" class="m_pp bbox icon-reduce"></div>
                                            <input class="m_dl_sl bbox" maxlength="4" value="${cart.FQty}" type="text">
                                            <div class="m_ps bbox icon-add"></div>
                                            <span class="m_p_del icon-delete"></span>
                                        </span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                      </c:forEach>
                      </div>
                  </div>
              </div>
              <div class="m_all_b bbox" style="display:none">
                  <span class="m_qx c_checked car_ck_all"></span><span class="m_bqx">全选</span>
                  <input class="m_sub_btn f_r" value="" id="count" type="button">
                  <span class="m_zjg f_r">合计：<span class="m_a_prie"></span></span>
              </div>
          </div>
          <!--返回顶部  -->
			<div class="return top" style="bottom:41px;right:82%">
		    	<a href="javascript:;"><img src="//s.juancdn.com/jpwebapp_v1/images_v1/icon/back-top.png?ts=43cd703b21136a3e_1480432233" ></a>
			</div>
      </div>
<script type="text/javascript">
var sjid=${sjid};
</script>
<script src="js/jquery-1.8.3.min.js"></script>
<script src="js/jquery-html5Validate.js"></script>
<script src="js/global.js?v=0715"></script>
<script src="js/cartCommon.js"></script>
<script src="js/cart.js?v=0517"></script>
</body>
</html>